package com.luobo.handler;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.luobo.service.IFeedbackRecieverService;

@Component
@RabbitListener(queues = "${systems.config.emailQueue:emailQueue}")
public class EmailHandler {
	@Autowired
	private IFeedbackRecieverService feedbackRecieverService;

	@RabbitHandler
	public void handler(String feedbackItemDo) {
		//发送email
		feedbackRecieverService.sendEmails(feedbackItemDo);
		//短信通知
		feedbackRecieverService.sendSms(feedbackItemDo);
		
		
	}
}
